<?php
error_reporting(E_ALL);
ini_set('display_errors', 'On');
//连接数据库
$testMysql = new cls_mysql('rdsjg3zfk4i0wrm5y777o.mysql.rds.aliyuncs.com','newyangwanyi','yangwanyi616','new_ywy');
$produceMysql = new cls_mysql('rdsjg3zfk4i0wrm5y777o.mysql.rds.aliyuncs.com','newyangwanyi','yangwanyi616','new_ywy');

//查询测试环境最新更新时间
$sql = "SELECT `create_time` FROM `haiou_weixin_token` ORDER BY `create_time` DESC LIMIT 1";
$record = $testMysql->getRow($sql);

//查询线上数据
$sql = "SELECT * FROM `haiou_weixin_token` WHERE `create_time` > '{$record['create_time']}' ORDER BY `id` ASC";
$records = $produceMysql->getAll($sql);
if (empty($records)) {
    exit('not update data');
}
